﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;

namespace RCREEE.Library
{
    /// <summary>
    /// The Data Manager, that handles all the data transaction between the Logic Layer and the Database.
    /// </summary>
    public static partial class DataManager
    {
        
        private static SqlConnection _Connection;
        private static SqlCommand _Command;
        private static SqlDataAdapter _Adapter;
        private static DataSet _DataSet;
        private static DataTable _DataTable;


        static DataManager()
        {
            _Connection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
            _Command = new SqlCommand("", _Connection);
            _Adapter = new SqlDataAdapter(_Command);
            _DataSet = new DataSet();
            _DataTable = new DataTable();

          
            try
            {
                _Connection.Open();
            }
            catch (Exception exc)
            {

            }
            finally
            {
                if (_Connection.State == ConnectionState.Open)
                    _Connection.Close();
            }
        }
    }
}
